home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
vclock.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
2KB
|
33 lines
(Comp.sys.handhelds)
Item: 2836 by stevev at greylady.uoregon.edu
Author: [Steve VanDevender]
Subj: HP-48 visual clock program
Date: Fri Apr 19 1991
This is a little something I've been hacking on for the last week
or so. I call it "SXwatch". It displays the current time in a
somewhat antiquated style which our modern digital watch-wearing
civilization doesn't use so much any more. It has the convenient
feature of staying idle most of the time by using a repeating
alarm to update the watch hands and laying around in 0 WAIT the
rest of the time. Start the display by evaluating SXWATCH and
stop by pressing any non-shift key.
I discovered an interesting behavior of control alarms while
writing this program. It appears that a control alarm aborts
execution of the currently running program when it goes off,
instead of acting as an interrupt. Incidentally, I also
discovered that a repeating alarm returns its alarm index for
AFTER it has been rescheduled, which I thought was convenient.
WARNING: Although I took as much care as possible to make this
program well-behaved, it is possible that it may accidentally
purge an alarm other than its own if you press ON at the wrong
time. Pressing ON while the alarm action is running may cause
the program to abort and not clean up after itself (it saves the
contents of the PICT and flags on entry, and restores them on
exit after killing the repeating alarm). Pressing any key other
than ON to halt the program should be safe, although I suspect
that if the alarm action is running it may not acknowledge such
keypresses.